package com.dao.impl;

import java.util.List;

import org.hibernate.Session;

import com.bean.District;
import com.dao.DistrictDao;

public class DistrictDaoImpl implements DistrictDao {

	@Override
	public List<District> getAll() {
		Session session = null;
		try {
			session = HibernateUtil.getSession();
			return session.createQuery("from District").list();
		} finally {
			if (session != null)
				session.close();
		}
	}

}
